package vno.fux.task
{
	public class ConditionInterpreter
	{
		private static var _switches:Array;
		public function ConditionInterpreter(switches_:Array)
		{
			throw new Error;
		}
		internal static function setSwitches(switches_:Array):void
		{
			_switches = switches_;
		}
		internal static function switchIsOn(params:String):Boolean
		{
			var tmp:Array = params.split(",");
			for each(var index:String in tmp)
			{
				if(!_switches[int(index)])
				{
					return false;
				}
			}
			return true;
		}
		internal static function switchIsOff(params:String):Boolean
		{
			var tmp:Array = params.split(",");
			for each(var index:String in tmp)
			{
				if(_switches[int(index)])
				{
					return false;
				}
			}
			return true;
		}
	}
}